<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 12">
<meta name=Originator content="Microsoft Word 12">
<link rel=File-List href="integration_files/filelist.xml">
<title>C++Script Manual</title>
<link rel=themeData href="integration_files/themedata.thmx">
<link rel=colorSchemeMapping href="integration_files/colorschememapping.xml">
<!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:GrammarState>Clean</w:GrammarState>
  <w:TrackMoves>false</w:TrackMoves>
  <w:TrackFormatting/>
  <w:ValidateAgainstSchemas/>
  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  <w:DoNotPromoteQF/>
  <w:LidThemeOther>EN-GB</w:LidThemeOther>
  <w:LidThemeAsian>X-NONE</w:LidThemeAsian>
  <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
   <w:DontGrowAutofit/>
   <w:SplitPgBreakAndParaMark/>
   <w:DontVertAlignCellWithSp/>
   <w:DontBreakConstrainedForcedTables/>
   <w:DontVertAlignInTxbx/>
   <w:Word11KerningPairs/>
   <w:CachedColBalance/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
  <m:mathPr>
   <m:mathFont m:val="Cambria Math"/>
   <m:brkBin m:val="before"/>
   <m:brkBinSub m:val="&#45;-"/>
   <m:smallFrac m:val="off"/>
   <m:dispDef/>
   <m:lMargin m:val="0"/>
   <m:rMargin m:val="0"/>
   <m:defJc m:val="centerGroup"/>
   <m:wrapIndent m:val="1440"/>
   <m:intLim m:val="subSup"/>
   <m:naryLim m:val="undOvr"/>
  </m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
  DefSemiHidden="true" DefQFormat="false" DefPriority="99"
  LatentStyleCount="267">
  <w:LsdException Locked="false" Priority="0" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
  <w:LsdException Locked="false" Priority="9" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
  <w:LsdException Locked="false" Priority="9" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="heading 2"/>
  <w:LsdException Locked="false" Priority="9" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="heading 3"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 1"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 2"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 3"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 4"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 5"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 6"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 7"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 8"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 9"/>
  <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
  <w:LsdException Locked="false" Priority="10" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Title"/>
  <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
  <w:LsdException Locked="false" Priority="11" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
  <w:LsdException Locked="false" Priority="22" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
  <w:LsdException Locked="false" Priority="20" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
  <w:LsdException Locked="false" Priority="59" SemiHidden="false"
   UnhideWhenUsed="false" Name="Table Grid"/>
  <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
  <w:LsdException Locked="false" Priority="1" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 1"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
  <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
  <w:LsdException Locked="false" Priority="34" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
  <w:LsdException Locked="false" Priority="29" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
  <w:LsdException Locked="false" Priority="30" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 1"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 2"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 2"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 3"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 3"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 4"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 4"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 5"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 5"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 6"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 6"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
  <w:LsdException Locked="false" Priority="19" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
  <w:LsdException Locked="false" Priority="21" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
  <w:LsdException Locked="false" Priority="31" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
  <w:LsdException Locked="false" Priority="32" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
  <w:LsdException Locked="false" Priority="33" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
  <w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
  <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
 </w:LatentStyles>
</xml><![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:roman;
	mso-font-pitch:variable;
	mso-font-signature:-1610611985 1107304683 0 0 159 0;}
@font-face
	{font-family:Cambria;
	panose-1:2 4 5 3 5 4 6 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:roman;
	mso-font-pitch:variable;
	mso-font-signature:-1610611985 1073741899 0 0 159 0;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:-1610611985 1073750139 0 0 159 0;}
@font-face
	{font-family:Consolas;
	panose-1:2 11 6 9 2 2 4 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:modern;
	mso-font-pitch:fixed;
	mso-font-signature:-1610611985 1073750091 0 0 159 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:"";
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";}
h1
	{mso-style-priority:9;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-link:"Heading 1 Char";
	mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	mso-pagination:widow-orphan;
	mso-outline-level:1;
	font-size:24.0pt;
	font-family:"Cambria","serif";
	mso-ascii-font-family:Cambria;
	mso-ascii-theme-font:major-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Cambria;
	mso-hansi-theme-font:major-latin;
	font-weight:bold;}
h2
	{mso-style-priority:9;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-link:"Heading 2 Char";
	mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	mso-pagination:widow-orphan;
	mso-outline-level:2;
	font-size:18.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	font-weight:bold;}
h3
	{mso-style-priority:9;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-link:"Heading 3 Char";
	mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	mso-pagination:widow-orphan;
	mso-outline-level:3;
	font-size:13.5pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	font-weight:bold;}
a:link, span.MsoHyperlink
	{mso-style-noshow:yes;
	mso-style-priority:99;
	color:blue;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-noshow:yes;
	mso-style-priority:99;
	color:purple;
	text-decoration:underline;
	text-underline:single;}
p
	{mso-style-noshow:yes;
	mso-style-priority:99;
	mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";}
pre
	{mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-link:"HTML Preformatted Char";
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
	font-size:10.0pt;
	font-family:"Courier New";
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;}
span.Heading1Char
	{mso-style-name:"Heading 1 Char";
	mso-style-priority:9;
	mso-style-unhide:no;
	mso-style-locked:yes;
	mso-style-link:"Heading 1";
	mso-ansi-font-size:24.0pt;
	mso-bidi-font-size:24.0pt;
	font-family:"Cambria","serif";
	mso-ascii-font-family:Cambria;
	mso-ascii-theme-font:major-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Cambria;
	mso-hansi-theme-font:major-latin;
	mso-font-kerning:18.0pt;
	font-weight:bold;}
span.Heading2Char
	{mso-style-name:"Heading 2 Char";
	mso-style-noshow:yes;
	mso-style-priority:9;
	mso-style-unhide:no;
	mso-style-locked:yes;
	mso-style-link:"Heading 2";
	font-family:"Cambria","serif";
	mso-ascii-font-family:Cambria;
	mso-hansi-font-family:Cambria;
	color:#4F81BD;
	font-weight:bold;}
span.Heading3Char
	{mso-style-name:"Heading 3 Char";
	mso-style-noshow:yes;
	mso-style-priority:9;
	mso-style-unhide:no;
	mso-style-locked:yes;
	mso-style-link:"Heading 3";
	font-family:"Cambria","serif";
	mso-ascii-font-family:Cambria;
	mso-hansi-font-family:Cambria;
	color:#4F81BD;
	font-weight:bold;}
span.HTMLPreformattedChar
	{mso-style-name:"HTML Preformatted Char";
	mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-unhide:no;
	mso-style-locked:yes;
	mso-style-link:"HTML Preformatted";
	font-family:Consolas;
	mso-ascii-font-family:Consolas;
	mso-hansi-font-family:Consolas;}
span.CodeChar
	{mso-style-name:"Code Char";
	mso-style-unhide:no;
	mso-style-locked:yes;
	mso-style-link:Code;
	font-family:"Courier New";
	mso-ascii-font-family:"Courier New";
	mso-hansi-font-family:"Courier New";
	mso-bidi-font-family:"Courier New";}
p.Code, li.Code, div.Code
	{mso-style-name:Code;
	mso-style-unhide:no;
	mso-style-link:"Code Char";
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:36.0pt;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Courier New";
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;}
p.msochpdefault, li.msochpdefault, div.msochpdefault
	{mso-style-name:msochpdefault;
	mso-style-unhide:no;
	mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";}
span.GramE
	{mso-style-name:"";
	mso-gram-e:yes;}
.MsoChpDefault
	{mso-style-type:export-only;
	mso-default-props:yes;
	font-size:10.0pt;
	mso-ansi-font-size:10.0pt;
	mso-bidi-font-size:10.0pt;}
@page Section1
	{size:595.3pt 841.9pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;
	mso-header-margin:35.4pt;
	mso-footer-margin:35.4pt;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
 /* List Definitions */
 @list l0
	{mso-list-id:440687466;
	mso-list-template-ids:1714854702;}
@list l0:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:36.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
ol
	{margin-bottom:0cm;}
ul
	{margin-bottom:0cm;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:"Table Normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-qformat:yes;
	mso-style-parent:"";
	mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
	mso-para-margin:0cm;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
</style>
<![endif]--><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="2050"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1"/>
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-GB link=blue vlink=purple style='tab-interval:36.0pt'>

<div class=Section1>

<h1><span style='mso-fareast-font-family:"Times New Roman"'>Integration<o:p></o:p></span></h1>

<h2><span style='mso-fareast-font-family:"Times New Roman"'>Large projects<o:p></o:p></span></h2>

<p>There will come a point where your single .cpp file gets too big and you
need to split it up.&nbsp;&nbsp; </p>

<h3><span style='mso-fareast-font-family:"Times New Roman"'>Method 1: Pass
several .cpp files to <i>cppscript</i><o:p></o:p></span></h3>

<p>The <i>cppscript</i> program can take several .cpp files on its command
line.&nbsp; You also want to declare your functions in header files (.hpp
files).&nbsp; Example:</p>

<p>foo1.cpp:</p>

<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>#include &lt;cppscript&gt;</pre><pre>#include &lt;foo.hpp&gt;</pre><pre>&nbsp;</pre><pre><span
class=GramE>var</span> script_main(var)</pre><pre>{</pre><pre>&nbsp;&nbsp;&nbsp; <span
class=GramE>f(</span>12);</pre><pre>&nbsp;&nbsp;&nbsp; <span class=GramE>return</span> 0;</pre><pre>}</pre></blockquote>

<p>foo2.cpp:</p>

<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>#include &lt;cppscript&gt;</pre><pre>#include &lt;foo.hpp&gt;</pre></blockquote>

<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>&nbsp;</pre><pre>void f(var i)</pre><pre><span
lang=SV style='mso-ansi-language:SV'>{<o:p></o:p></span></pre><pre><span
lang=SV style='mso-ansi-language:SV'>&nbsp;&nbsp;&nbsp; writeln(i);<o:p></o:p></span></pre><pre><span
lang=SV style='mso-ansi-language:SV'>}<o:p></o:p></span></pre></blockquote>

<p><span lang=SV style='mso-ansi-language:SV'>foo.hpp:<o:p></o:p></span></p>

<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre><span lang=SV
style='mso-ansi-language:SV'>void f(var);<o:p></o:p></span></pre></blockquote>

<h3><span style='mso-fareast-font-family:"Times New Roman"'>Method 2: #include
your .cpp files<o:p></o:p></span></h3>

<p>You can instead create a single .cpp file which #includes the other
files.&nbsp; <span class=GramE>e.g.</span></p>

<p>foo.cpp:</p>

<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>#include &quot;foo1.cpp&quot;</pre><pre>#include &quot;foo2.cpp&quot;</pre></blockquote>

<p>The benefit of this approach is that you have just one source file to pass
to cppscript.&nbsp; Compilation times could get very long though.</p>

<h3><span style='mso-fareast-font-family:"Times New Roman"'>Method 3: Compile
as C++<o:p></o:p></span></h3>

<p>You can avoid using the <i>cppscript</i> program altogether, and just
compile the program as C++.&nbsp; Then you just use the normal C++ tools like <i>make</i>
to build the project as any C++ project.&nbsp; This is the recommended approach
for large programs, and when C++Script is integrated with a C++ program.</p>

<p>Assuming g++, the command line for the previous example would be:</p>

<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre><span
class=GramE>g</span>++ foo1.cpp foo2.cpp -o foo -lcppscript</pre></blockquote>

<h2><span style='mso-fareast-font-family:"Times New Roman"'>C++ integration<o:p></o:p></span></h2>

<h3><span style='mso-fareast-font-family:"Times New Roman"'>Header files and
namespace<o:p></o:p></span></h3>

<p>All C++Script's functions, and the <i>var</i> type, are actually in the <i>dynamic
</i>namespace.</p>

<p>The main include file is <i>&lt;cppscript&gt;</i> (following the C++
standard's example of omitting the filename extension), which contains the
statement <i>using namespace dynamic</i>&nbsp; This is normally&nbsp;desired,
but breaks the rule to avoid using namespace in header files.&nbsp; The header
file <i>&lt;dynamic/dynamic.hpp&gt;</i> does not have <i>using namespace</i>
and should be used if there is a name clash.</p>

<p>The main include files to know about are</p>

<ul style='margin-top:0cm' type=disc>
 <li class=MsoNormal style='mso-list:l0 level1 lfo1;tab-stops:list 36.0pt'><i><span
     style='mso-fareast-font-family:"Times New Roman"'>#include
     &lt;cppscript&gt; -</span></i><span style='mso-fareast-font-family:"Times New Roman"'>
     the default header file includes all core functions in the global
     namespace<o:p></o:p></span></li>
 <li class=MsoNormal style='mso-list:l0 level1 lfo1;tab-stops:list 36.0pt'><i><span
     style='mso-fareast-font-family:"Times New Roman"'>#include
     &lt;dynamic/dynamic.hpp&gt; -</span></i><span style='mso-fareast-font-family:
     "Times New Roman"'> the&nbsp;library in the <i>script</i> namespace.<o:p></o:p></span></li>
 <li class=MsoNormal style='mso-list:l0 level1 lfo1;tab-stops:list 36.0pt'><i><span
     style='mso-fareast-font-family:"Times New Roman"'>#include &lt;dynamic/extensions.hpp&gt;
     -</span></i><span style='mso-fareast-font-family:"Times New Roman"'> used
     for extending C++Script or providing custom <i>var</i> implementations<o:p></o:p></span></li>
</ul>

<h3><span style='mso-fareast-font-family:"Times New Roman"'>Libraries<o:p></o:p></span></h3>

<p>The C++Script library is called <i>dynamic,</i> which may appear as <i>libdynamic.a</i>
or <i>libdynamic.lib</i> on your platform.</p>

<h3><span style='mso-fareast-font-family:"Times New Roman"'>Calling C and C++
from C++Script, and vice versa<o:p></o:p></span></h3>

<p>This is trivially supported by compiling C++Script as C++.&nbsp; C++ can
call C++Script functions, and C++Script can use native C++ as needed.</p>

<p>It isn't possible to call C++Script directly from C. &nbsp;You would need to
write an <i>extern &quot;C&quot;</i> function.</p>

<h3><span style='mso-fareast-font-family:"Times New Roman"'>Converting between
var and C++ values<o:p></o:p></span></h3>

<p>The <i>var</i> constructor takes a range of C++ values, including <i>bool</i>,
<i>char</i>, <i>wchar_t</i>, <i>int</i>, <i>double</i>, <i>char*</i>, <i>wchar_t*</i>,
<i>std::string</i>, <i>std::wstring</i>, functions of <i>var</i>, and
fixed-size arrays.&nbsp; These values get converted automatically to a <i>var</i>
of the appropriate type.</p>

<p>The method <i>var::operator <span class=GramE>bool(</span>)</i> converts the
var to a boolean (same as <i>var::as_bool()</i>), and <i>var::operator int()</i>
converts the var to an integer (same as <i>var::as_int()</i>).&nbsp; For other
conversions, the methods <i>var::as_<span class=GramE>bool(</span>),
var::as_int(), var::as_double(), var::as_string()</i> and<i> var::as_wstring()</i>
convert the var to an appropriate C++ type.&nbsp; The conversion always
succeeds, but may return a default value such as <i>false</i>, <i>0</i> or the
empty string if the <i>var</i> doesn't contain an approproate type.&nbsp; <span
class=GramE>integers</span>, doubles and strings try their best to convert
their contents to the requested type.</p>

<h3><span style='mso-fareast-font-family:"Times New Roman"'>Storing C++ values
in var<o:p></o:p></span></h3>

<p>The <span class=GramE><i>create(</i></span><i>)</i> templated function
returns a <i>var</i> containing the C++ value.&nbsp; The templated method <i>var::<span
class=GramE>as(</span>)</i> method accesses the stored value, or throws an
exception (<i>&quot;not_supported&quot;</i>) if the var does not store a value
of the given type.</p>

<p>e.g. (<a href="cppvalues.cpp">cppvalues.cpp</a>)</p>

<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>#include &lt;cppscript&gt;</pre><pre>#include &lt;dynamic/extensions.hpp&gt;</pre><pre>&nbsp;</pre><pre><span
class=GramE>var</span> script_main(var)</pre><pre>{</pre><pre>&nbsp;&nbsp;&nbsp; <span
class=GramE>var</span> two = create(2);</pre><pre>&nbsp;&nbsp;&nbsp; <span
class=GramE>writeln(</span> two.as&lt;int&gt;() ); // Output: 2</pre><pre>&nbsp;&nbsp;&nbsp; <span
class=GramE>writeln(</span> two.as&lt;std::string&gt;() ); // Throws &quot;not_supported&quot;</pre><pre>&nbsp;&nbsp;&nbsp; <span
class=GramE>return</span> 0;</pre><pre>}</pre></blockquote>

<h3><span style='mso-fareast-font-family:"Times New Roman"'>Converting from
C-style arrays<o:p></o:p></span></h3>

<p>Arrays can be created from a C-style array, by passing them to the
constructor of <i>var</i>.</p>

<p class=Code><span class=GramE>var</span> items[] = { 1, 2, 3.14,
&quot;pony&quot; };<br>
var a = items;</p>

<pre style='margin-left:36.0pt'>&nbsp;</pre>

<p class=MsoNormal>Arrays can be created from a pair of C++ iterators, using
the <i>array_<span class=GramE>it(</span>)</i> function.</p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>Lists can be created by passing a C-style array to the <span
class=GramE><i>list(</i></span><i>)</i> function, or by passing a pair of C++
iterators to the <i>list_it()</i> function.&nbsp; <span class=GramE>E.g.</span></p>

<p class=MsoNormal>&nbsp;</p>

<p class=Code style='margin-bottom:12.0pt'><span class=GramE>var</span> items[]
= { 1, 2, 3, &quot;pony&quot; };<br>
var l2 = list(items);<br>
var l4 = list_it(a, b); // a and b are input iterators</p>

<p class=MsoNormal>Sets can be created by passing a C-style array to the <span
class=GramE><i>set(</i></span><i>)</i> function, or by passing a pair of C++
iterators to the <i>set_it()</i> function.</p>

<h3><span style='mso-fareast-font-family:"Times New Roman"'>Implementing native
C++Script objects<o:p></o:p></span></h3>

<p class=MsoNormal>This is beyond the scope of this tutorial - see the
accompanying <a href="implementers_guide.html">implementers guide</a>. </p>

<h2><a name=netintegration></a><span style='mso-fareast-font-family:"Times New Roman"'>.net
integration<o:p></o:p></span></h2>

<p class=MsoNormal>C++Script implements its own garbage collector rather than
relying on the .net CLR. &nbsp;Managed C++ can use both C++Script and the .net
class libraries, though obviously this will not be portable.<br>
<br>
There are a few little quirks with Visual C++, such as the fact that the
program entry point can't be in a library, so add the file <i>script_main.cpp</i>
to the project, and disable pre-compiled headers on the file if necessary.<br>
<br>
Future versions of C++Script might support dynamic dispatch, and COM
interoperability. </p>

<h2><span style='mso-fareast-font-family:"Times New Roman"'>Unit Tests<o:p></o:p></span></h2>

<p class=MsoNormal>The <i>run_<span class=GramE>tests(</span>)</i> function
accepts an associative container (such as a map or an object), where each
element in the container represents a different unit test. &nbsp;All exceptions
are caught and logged. &nbsp;The function returns the number of tests which
failed (0 means all tests passed). &nbsp;The function <span class=GramE><i>assertx(</i></span><i>)</i>
throws an exception when its argument is false. &nbsp;e.g. (<a href="test.cpp">test.cpp</a>)</p>

<pre style='margin-left:30.0pt'>&nbsp;</pre><pre style='margin-left:30.0pt'>#include &lt;cppscript&gt;</pre><pre
style='margin-left:30.0pt'>&nbsp;</pre><pre style='margin-left:30.0pt'><span
class=GramE>void</span> test_int_int_addition()</pre><pre style='margin-left:
30.0pt'>{</pre><pre style='margin-left:30.0pt'>&nbsp;&nbsp; <span class=GramE>assertx(</span> var(1) + 2 == 3 );</pre><pre
style='margin-left:30.0pt'>}</pre><pre style='margin-left:30.0pt'>&nbsp;</pre><pre
style='margin-left:30.0pt'><span class=GramE>void</span> test_string_string_addition()</pre><pre
style='margin-left:30.0pt'>{</pre><pre style='margin-left:30.0pt'>&nbsp;&nbsp; <span
class=GramE>assertx(</span> var(&quot;abc&quot;) + &quot;def&quot; == &quot;abcdef&quot; );</pre><pre
style='margin-left:30.0pt'>}</pre><pre style='margin-left:30.0pt'>&nbsp;</pre><pre
style='margin-left:30.0pt'><span class=GramE>void</span> test_string_int_addition()</pre><pre
style='margin-left:30.0pt'>{</pre><pre style='margin-left:30.0pt'>&nbsp;&nbsp; <span
class=GramE>assertx(</span> var(&quot;abc&quot;) + 2 == &quot;abc2&quot; );</pre><pre
style='margin-left:30.0pt'>}</pre><pre style='margin-left:30.0pt'>&nbsp;</pre><pre
style='margin-left:30.0pt'><span class=GramE>void</span> test_int_string_addition()</pre><pre
style='margin-left:30.0pt'><span lang=SV style='mso-ansi-language:SV'>{<o:p></o:p></span></pre><pre
style='margin-left:30.0pt'><span lang=SV style='mso-ansi-language:SV'>&nbsp;&nbsp; assertx( var(1) + &quot;2&quot; == 3 );<o:p></o:p></span></pre><pre
style='margin-left:30.0pt'><span lang=SV style='mso-ansi-language:SV'>}<o:p></o:p></span></pre><pre
style='margin-left:30.0pt'><span lang=SV style='mso-ansi-language:SV'>&nbsp;<o:p></o:p></span></pre><pre
style='margin-left:30.0pt'><span lang=SV style='mso-ansi-language:SV'>var script_main(var)<o:p></o:p></span></pre><pre
style='margin-left:30.0pt'>{</pre><pre style='margin-left:30.0pt'>&nbsp;&nbsp; <span
class=GramE>var</span> tests = map</pre><pre style='margin-left:30.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&quot;<span
class=GramE>int</span> int addition&quot;, test_int_int_addition)</pre><pre
style='margin-left:30.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&quot;<span
class=GramE>int</span> string addition&quot;, test_int_string_addition)</pre><pre
style='margin-left:30.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&quot;<span
class=GramE>string</span> int addition&quot;, test_string_int_addition)</pre><pre
style='margin-left:30.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&quot;<span
class=GramE>string</span> string addition&quot;, test_string_string_addition);</pre><pre
style='margin-left:30.0pt'>&nbsp;&nbsp; <span class=GramE>return</span> run_tests( tests );</pre><pre
style='margin-left:30.0pt'>}</pre></div>

</body>

</html>
